package com.stedu;

import com.stedu.bean.College;
import com.stedu.exception.SteduException;
import com.stedu.service.CollegeService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class MyTest1 {
    @Autowired
    private CollegeService collegeService;
    @Test
    public void Test1(){
        collegeService.selectAll().stream().forEach(System.out::println);
    }
    @Test
    public void Test2(){
        System.out.println(collegeService.selectByZid(1));
    }
    @Test
    public void Test3() throws SteduException {
        collegeService.update(new College(1,"计算机院", "计算机科学与技术"));
    }
}
